﻿namespace iOSClub.App.Share;

[Serializable]
public class ToolModel
{
    public string Id { get; set; } = "";

    public string Name { get; set; } = "";
    public string Url { get; set; } = "";
    public string IconUrl { get; set; } = "";
    public string Description { get; set; } = "";
    public string? Tag { get; set; }

    public void Update(ToolModel model)
    {
        if (!string.IsNullOrEmpty(model.Name)) Name = model.Name;
        if (!string.IsNullOrEmpty(model.Url)) Url = model.Url;
        if (!string.IsNullOrEmpty(model.IconUrl)) IconUrl = model.IconUrl;
        if (!string.IsNullOrEmpty(model.Description)) Description = model.Description;
        Tag = model.Tag;
    }
}